Skip to content

Conversation

@fmease
Copy link
Member

@fmease fmease commented Jan 8, 2026

Under feature min_generic_const_args (mGCA) (#132980), render traits with non-parametrized type-level associated constants (i.e., #[type_const] ones) dyn compatible but force the user to specify all type-level associated consts in the trait object type via bindings (either directly, via supertrait bounds and/or behind trait aliases) just like associated types, their sibling.

Fixes #130300 (feature request).
Fixes #136063 (bug).
Fixes #137260 (bug).
Fixes #137514 (bug).

While I'm accounting for most illegal Self references via const projections & params, I'm intentionally ignoring RUST-123140 (and duplicates) in this PR which is to be tackled some other time.

Additional context: Crate rustc-demangle had to be updated to fix v0 demangling. I've patched it in PR rust-lang/rustc-demangle#87 which was was released in version 0.1.27 via PR rust-lang/rustc-demangle#88.

@fmease fmease added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-types Relevant to the types team, which will review and decide on the PR/issue. F-associated_const_equality `#![feature(associated_const_equality)]` labels Jan 8, 2026
@fmease fmease added the F-min_generic_const_args `#![feature(min_generic_const_args)]` label Jan 8, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2026

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

This PR modifies tests/ui/issues/. If this PR is adding new tests to tests/ui/issues/,
please refrain from doing so, and instead add it to more descriptive subdirectories.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 8, 2026
@fmease fmease moved this to In Progress in Associated Const Equality (ACE) Jan 8, 2026
@fmease

This comment was marked as outdated.

@rust-timer

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 8, 2026
mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 8, 2026
@rust-log-analyzer

This comment has been minimized.

@fmease

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@fmease

This comment was marked as outdated.

@rust-timer

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 8, 2026
mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jan 8, 2026
@fmease fmease changed the title mGCA: Make trait object types with type associated consts dyn compatible if the latter are specified via bindings mGCA: Make trait object types with type-level associated consts dyn compatible if the latter are specified via bindings Jan 8, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 21, 2026
mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings

Under feature `min_generic_const_args` (mGCA) (#132980), render traits with non-parametrized type-level associated constants (i.e., `#[type_const]` ones) dyn compatible but force the user to specify all type-level associated consts in the trait object type via bindings (either directly, via supertrait bounds and/or behind trait aliases) just like associated types, their sibling.

Fixes #130300 (feature request).
Fixes #136063 (bug).
Fixes #137260 (bug).
Fixes #137514 (bug).

While I'm accounting for most illegal `Self` references via const projections & params, I'm intentionally ignoring RUST-123140 (and duplicates) in this PR which is to be tackled some other time.

Additional context: Crate `rustc-demangle` had to be updated to fix v0 demangling. I've patched it in PR rust-lang/rustc-demangle#87 which was was released in version 0.1.27 via PR rust-lang/rustc-demangle#88.
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 21, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

💔 Test for 22663dd failed: CI. Failed job:

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2026
@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

@bors try jobs=aarch64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 21, 2026
mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings


try-job: aarch64-msvc-1
@fmease fmease changed the title mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings mGCA: Make trait object types with type-level associated consts dyn compatible Jan 21, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

☀️ Try build successful (CI)
Build commit: 06ef80b (06ef80b88ee75417e82ca7665be3db614f225321, parent: 625b63f9e148d511e187c71e5f70643ee62c77fb)

@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

@bors r=BoxyUwU

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 21, 2026

📌 Commit 558a592 has been approved by BoxyUwU

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 21, 2026
@fmease
Copy link
Member Author

fmease commented Jan 21, 2026

@bors p=0

@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 22, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 22, 2026

☀️ Test successful - CI
Approved by: BoxyUwU
Duration: 3h 18m 28s
Pushing b765963 to main...

@rust-bors rust-bors bot merged commit b765963 into rust-lang:main Jan 22, 2026
13 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Associated Const Equality (ACE) Jan 22, 2026
@rustbot rustbot added this to the 1.95.0 milestone Jan 22, 2026
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 004d710 (parent) -> b765963 (this PR)

Test differences

Show 73 test diffs

Stage 1

  • [crashes] tests/crashes/136063.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/137260.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/137514.rs: pass -> [missing] (J1)
  • [debuginfo-gdb] tests/debuginfo/associated-const-bindings.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-assoc-const-ty-mentions-self.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-basic.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-mismatch.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-param-default-mentions-self.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-behind-trait-alias-mentions-self.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-from-supertrait-mentions-self.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-generic-assoc-const.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-non-type-assoc-const.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-bound-on-assoc-const-allowed-and-enforced.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-assoc-const-ty.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-methods.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-supertrait-bounds.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-symbol-mangling.rs#v0: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-unspecified-assoc-consts.rs: [missing] -> pass (J1)
  • [ui] tests/ui/dyn-compatibility/trait-alias-self-projection.rs: pass -> [missing] (J1)
  • [ui] tests/ui/dyn-compatibility/type-projection-behind-trait-alias-mentions-self.rs: [missing] -> pass (J1)

Stage 2

  • [debuginfo-gdb (split-dwarf)] tests/debuginfo/associated-const-bindings.rs: [missing] -> pass (J0)
  • [debuginfo-lldb] tests/debuginfo/associated-const-bindings.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-assoc-const-ty-mentions-self.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-basic.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-mismatch.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-param-default-mentions-self.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-behind-trait-alias-mentions-self.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-from-supertrait-mentions-self.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-generic-assoc-const.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-non-type-assoc-const.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-bound-on-assoc-const-allowed-and-enforced.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-assoc-const-ty.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-methods.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-supertrait-bounds.rs: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-symbol-mangling.rs#v0: [missing] -> pass (J3)
  • [ui] tests/ui/const-generics/associated-const-bindings/dyn-compat-unspecified-assoc-consts.rs: [missing] -> pass (J3)
  • [ui] tests/ui/dyn-compatibility/trait-alias-self-projection.rs: pass -> [missing] (J3)
  • [ui] tests/ui/dyn-compatibility/type-projection-behind-trait-alias-mentions-self.rs: [missing] -> pass (J3)
  • [debuginfo-gdb] tests/debuginfo/associated-const-bindings.rs: [missing] -> ignore (gcc backend is marked as ignore) (J4)
  • [debuginfo-cdb] tests/debuginfo/associated-const-bindings.rs: [missing] -> pass (J5)
  • [crashes] tests/crashes/137514.rs: ignore (ignored if rustc wasn't built with debug assertions) -> [missing] (J6)
  • [crashes] tests/crashes/137514.rs: pass -> [missing] (J7)
  • [crashes] tests/crashes/136063.rs: pass -> [missing] (J8)
  • [crashes] tests/crashes/137260.rs: pass -> [missing] (J8)
  • [debuginfo-gdb] tests/debuginfo/associated-const-bindings.rs: [missing] -> pass (J9)

Additionally, 28 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard b765963267a390d817d0b519b15cfa0d6311d0dc --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 8950.9s -> 6510.6s (-27.3%)
  2. dist-apple-various: 4989.3s -> 3821.9s (-23.4%)
  3. dist-x86_64-apple: 7843.0s -> 6393.7s (-18.5%)
  4. aarch64-apple: 11383.5s -> 9415.1s (-17.3%)
  5. dist-ohos-x86_64: 4058.5s -> 4737.8s (+16.7%)
  6. dist-aarch64-apple: 6828.7s -> 7945.4s (+16.4%)
  7. dist-ohos-armv7: 3991.7s -> 4622.2s (+15.8%)
  8. dist-x86_64-netbsd: 4633.1s -> 5103.7s (+10.2%)
  9. dist-s390x-linux: 4987.6s -> 5482.2s (+9.9%)
  10. aarch64-msvc-2: 5858.7s -> 6428.8s (+9.7%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b765963): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.6%, secondary 2.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.5%, 2.8%] 2
Improvements ✅
(primary)
-2.6% [-3.3%, -2.1%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.6% [-3.3%, -2.1%] 3

Cycles

Results (secondary -2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-4.4%, -1.9%] 4
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.0%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.0%] 12
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 12

Bootstrap: 471.731s -> 473.6s (0.40%)
Artifact size: 383.18 MiB -> 383.21 MiB (0.01%)

@fmease fmease deleted the dyn-ace branch January 22, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool F-associated_const_equality `#![feature(associated_const_equality)]` F-min_generic_const_args `#![feature(min_generic_const_args)]` merged-by-bors This PR was explicitly merged by bors. rla-silenced Silences rust-log-analyzer postings to the PR it's added on. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

6 participants